package com.chinasoft.set01.hashset2;

import java.util.HashSet;

public class TestHashset01 {
    public static void main(String[] args) {
        HashSet<Student> set = new HashSet<>();
        Student s1 = new Student("zhangsan",10);
        Student s2 = new Student("lisi",15);
        Student s3 = new Student("zhangsan",10);

        set.add(s1);
        set.add(s2);
        set.add(s3);

        for(Student stu : set){
            System.out.println("stu = " + stu);
        }


    }
}